<template>
	<view class="container">
		<search></search>
		<view class="yg-swiper">
			<swiper indicator-color="true" autoplay="true" indicator-dots="true" interval="3000">
				<swiper-item v-for="item in list" :key='item.goods_id'>
					<navigator :url="'/pages/goods_detail/goods_detail?goods_id='+item.goods_id">	
						<image :src="item.image_src"></image>
					</navigator>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	import search from '@/components/Search.vue'
	import {request}  from '@/request/request.js'
	export default {
		components:{
			search
		},
		data() {
			return {
				href: 'https://uniapp.dcloud.io/component/README?id=uniui',
				list:[]
			}
		},
		 async created(){
		   const {message} = await request({url:'home/swiperdata'})
		   this.list =message
		},
		methods: {
		}
	}
</script>

<style scoped lang="scss">
	.yg-swiper{
		width: 750rpx;
		height: 340rpx;
		// background-color: cyan;
		navigator{
			height: 100%;
			image{
				height: 100%;
			}
		}
	}
</style>
